<template>
  <div>
  <div class="Grid">
   <home v-for='item in list' :key='item.houseCode' :item='item'/>
  </div>
  </div>
</template>

<script>
import { House } from '@/api'
import home from '@/views/components/home'
import { Toast } from 'vant'
export default {

  data () {
    return {
      list: [],
      isloding: false
    }
  },
  methods: {

  },
  components: { home },
  async beforeCreate () {
    await Toast.loading({
      message: '加载中...',
      forbidClick: this.isloding
    })
    this.isloding = false
  },
  async created () {
    try {
      const res = await House()
      this.list = res.data.body.list
      this.isloding = false
    } catch (err) {
      this.isloding = false
    }
  }
}
</script>

<style lang='less' scoped>
.Grid{
}
</style>
